package batiment;

import habitant.Soldat;

import java.util.ArrayList;
import java.util.Collection;

import ressourceImpl.QuantiteRessource;
import ressourceImpl.RessourceImpl;

/**
 * 
 * @modelguid {547CDB88-2221-4F51-930F-2AC2C3C29DF6}
 */
public class Batiment {
	/**
	 * 
	 * @modelguid {881EAB41-B044-4AD3-ADEB-45BE925B184D}
	 */
	private int _superficie;

	/**
	 * 
	 * @modelguid {A59B3F07-96B6-4977-8C6B-D0A77D02F75C}
	 */
	private Collection<QuantiteRessource> _cout;

	/**
	 * 
	 * @modelguid {87EB5E83-C0DB-4327-B13A-5897EE584982}
	 */
	private int _vitesse_construction;

	/**
	 * 
	 * @modelguid {2F57FE50-193F-4033-B0E5-D73D5A8571BF}
	 */
	private int _vistesse_destruction;

	/**
	 * 
	 * @modelguid {55119A51-CB21-4FA6-B9F5-3FB9FA0DC682}
	 */
	private int _resistance;

	private String _nom;

	protected Batiment(int sup, Collection<QuantiteRessource> c,
			int vit_constr, int vit_destru, int res, String nom) {
		this.set_superficie(sup);
		this.set_cout(c);
		this.set_vitesse_construction(vit_constr);
		this.set_vistesse_destruction(vit_destru);
		this.set_resistance(res);
		this.set_nom(nom);
		BatimentManager.add(this);
	}

	public void set_nom(String nom) {
		this._nom = nom;

	}

	/** @modelguid {9E0BF53A-A439-443D-BB2B-ADE301610BC1} */
	public int get_superficie() {
		/* Begin Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5} */

		return _superficie;
		/* End Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5} */
	}

	/** @modelguid {EB989772-6E33-46C9-921B-7D83E077D2E2} */
	public void set_superficie(int a_superficie) {
		/* Begin Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5} */
		_superficie = a_superficie;
		/* End Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5} */
	}

	/** @modelguid {72BFC181-9115-4CC2-A3F8-4C55EB3EEBD7} */
	public Collection<QuantiteRessource> get_cout() {
		/* Begin Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5} */

		return _cout;
		/* End Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5} */
	}

	/** @modelguid {8D6CE10B-88D3-4799-AC1F-FDE48D5DFF79} */
	public void set_cout(Collection<QuantiteRessource> a_cout) {
		/* Begin Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5} */
		_cout = new ArrayList<QuantiteRessource>(a_cout);
		/* End Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5} */
	}

	/** @modelguid {C7BC26C4-7C09-42FD-9721-2C84135C7D88} */
	public int get_vitesse_construction() {
		/* Begin Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5} */

		return _vitesse_construction;
		/* End Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5} */
	}

	/** @modelguid {27546DD9-4A16-4EA9-83F8-67C1D55C9546} */
	public void set_vitesse_construction(int a_vitesse_construction) {
		/* Begin Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5} */
		_vitesse_construction = a_vitesse_construction;
		/* End Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5} */
	}

	/** @modelguid {701DE1BB-1AF6-4B71-96FE-33946289748D} */
	public int get_vistesse_destruction() {
		/* Begin Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5} */

		return _vistesse_destruction;
		/* End Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5} */
	}

	/** @modelguid {52858045-A70B-490B-99C1-DD1924A1B1CA} */
	public void set_vistesse_destruction(int a_vistesse_destruction) {
		/* Begin Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5} */
		_vistesse_destruction = a_vistesse_destruction;
		/* End Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5} */
	}

	/** @modelguid {EA7497E3-B064-48C4-87E6-097C03C726F1} */
	public int get_resistance() {
		/* Begin Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5} */

		return _resistance;
		/* End Template Expansion{D463887C-0F96-42C1-B8DC-90E8DC272BD5} */
	}

	/** @modelguid {8A025B7B-2252-4C3D-914C-AA9242B524FE} */
	public void set_resistance(int a_resistance) {
		/* Begin Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5} */
		_resistance = a_resistance;
		/* End Template Expansion{CA3F77E8-8B8B-47C4-A1B8-CE1F21AEAEA5} */
	}

	public String get_nom() {
		// TODO Auto-generated method stub
		return this._nom;
	}

	// Ajouts un peu houleux xD

	public QuantiteRessource produire(int nb) {
		// TODO Auto-generated method stub
		return null;
	}

	public int get_capacite() {
		// TODO Auto-generated method stub
		return 0;
	}

	public RessourceImpl get_ressource() {
		// TODO Auto-generated method stub
		return this.get_ressource();
	}

	public Soldat get_leTypeDeSoldat() {
		// TODO Auto-generated method stub
		return null;
	}

	public int getNbPaysNec() {
		// TODO Auto-generated method stub
		return this._resistance/100;
	}

}
